<template>
	<view
		@click="handleSearchBox"
		:style="{ 'background-color': bgColor }"
		class="my-search-container">
		<view
			:style="{ 'border-radius': radius + 'px' }"
			class="my-search-box">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			handleSearchBox(){
				this.$emit('handleClick')
			}
		},
		data() {
			return {
				
			}
		},
		props: {
			bgColor: {			// 背景颜色
				type: String,
				default: '#C00000'
			},
			radius: {				// 边框圆角
				type: Number,
				default: 18
			}
		},
		name:"my-search"
	}
</script>

<style lang="scss">
.my-search-container {
	height: 50px;
	padding: 0 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	// background-color: #C00000;
	
	.my-search-box {
			width: 100%;
			height: 36px;
			background-color: #FFFFFF;
			// border-radius: 18px;
			display: flex;
			align-items: center;
			justify-content: center;
			
			.placeholder {
				font-size: 15px;
				margin-left: 5px;
			}
	}
}
</style>